<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .smallBox {
            position: relative;
            width: 200px;
            height: 50px;
            border: 1px solid pink;
            border-radius: 20px;
            margin: 300px auto 0;
            overflow: hidden;
        }
        
        .bigBox {
            position: absolute;
            height: 50px;
        }
        
        .bigBox li {
            /* position: absolute; */
            width: 200px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            margin: 0 auto;
            font-size: 20px;
            list-style: none;
        }
    </style>
    <script src="jquery-1.11.0.min.js"></script>
    <script src="animate.js"></script>
</head>

<body>
    <div class="smallBox">
        <ul class="bigBox">
            <li id="first">大吉大利</li>
            <li>今晚吃鸡</li>
        </ul>
    </div>
    <script>
        $(function() {
            var firstLi = $('#first').clone(true);
            $('.bigBox').append(firstLi);
            // var move = $('.bigBox>li').height();
            var move = 0;
            fn();
            var timer = setInterval(fn, 30);

            function fn() {
                // $('.bigBox').animate({
                //     'top': -move
                // }, 1000);  
                move++;

                if (move >= 100) {

                    move = 0;

                }
                $('.bigBox').css('top', -move + 'px');

            }
        })
    </script>
</body>

</html>